var status = -1;
var selectionLog = [];

function action(e, d, c) {
    var b = cm.getEventInstance();
    if (status == 0 && e == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = c;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.updateInfoQuest(34024, "1=1;2=0");
            cm.curNodeEventEnd(true);
            cm.setInGameDirectionMode(true, false, false);
            cm.inGameDirectionEvent_SetAdditionalEffectVisibleForInGameDirection();
            cm.inGameDirectionEvent_SetHideEffect(1);
            cm.curNodeEventEnd(true);
            cm.fieldEffect_PlayFieldSound("Sound/SoundEff.img/BossDemian/phase1", 100);
            cm.fieldEffect_复合图片动画(["Map/Effect2.img/DemianIllust/1pahseSp/demian", "animation", ""], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0]);
            cm.inGameDirectionEvent_AskAnswerTime(8000)
        } else {
            if (status === a++) {
                cm.inGameDirectionEvent_SetHideEffect(0);
                cm.inGameDirectionEvent_ForcedFlip15(700, 0, 0, 0, 0);
                if (b.getName().contains("普通")) {
                    cm.warp(350160200, 0, true)
                } else {
                    cm.warp(350160100, 0, true)
                }
                cm.setInGameDirectionMode(false, true, false);
                cm.dispose()
            } else {
                cm.dispose()
            }
        }
    }
}

function start() {
    status = -1;
    action(1, 0, 0)
};